The idea is to move handling of "inherit" as early in the parsing as possible.
Part of https://gitlab.gnome.org/GNOME/gnome-shell/issues/1934
CRRgb rgb;
enum CRStatus status;
+ if (term_is_inherit (term))
+ {
+ return VALUE_INHERIT;
+ }
/* Since libcroco doesn't know about rgba colors, it can't handle
* the transparent keyword
*/
- if (term_is_transparent (term))
+ else if (term_is_transparent (term))
{
*color = TRANSPARENT_COLOR;
return VALUE_FOUND;
if (status != CR_OK)
return VALUE_NOT_FOUND;
- if (rgb.inherit)
- return VALUE_INHERIT;
-
if (rgb.is_percentage)
cr_rgb_compute_from_percentage (&rgb);